home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Games / NeXTmille / Source / TrafficLightView.h < prev    next >
Text File  |  1990-12-26  |  2KB  |  49 lines

  1.  
  2. /* Generated by Interface Builder */
  3.  
  4. #import "CardView.h"
  5. #import    <appkit/graphics.h>
  6.  
  7.  
  8. // This is a base class for the Roll 
  9. //    and Stop traffic light cards.
  10.  
  11.  
  12.                                                 // There are three balls to be drawn in the stop/roll
  13.                                                 //    cards.  These data structures specify the information
  14.                                                 //    needed to locate and draw those balls.  
  15.                                                 // Rather than using nice structures to show the structure's
  16.                                                 //    contents, I have to use arrays of floats.  This is
  17.                                                 //    because I pass the arrays to pswrapped code.
  18.                                                 // Arrays are: [0]=center_x, [1]=center_y, [2]=radius.
  19.     extern float    redLight[], greenLight[], ulBall[], lrBall[];
  20.                         
  21.                         
  22. @interface TrafficLightView:CardView
  23. {
  24.  
  25.                                                 // These instance variables are used by the drawSelf:: method
  26.                                                 //    implemented in this class but must be initialized by the
  27.                                                 //    sub classes.
  28.  
  29.                                                 // These two variables declare what color the red and
  30.                                                 //    grean lamps of the traffic light will be drawn with.
  31.     float    redLightColor, greenLightColor;
  32.                                                 // This variable holds the color that the smaller balls
  33.                                                 //    and label text will be drawn with.
  34.     float    ballAndLabelColor;
  35.                                                 // This is the card label (e.g. "Stop" or "Roll").
  36.     char    *label;
  37. }
  38.  
  39.  
  40.                                                 // The traffic light view is a base class, of sorts.
  41.                                                 //    It locates and initializes the bottom face bitmap
  42.                                                 //    for the traffic light.
  43. - init;
  44.  
  45. - drawSelf:( const NXRect * )rects :( int )rectCount;
  46.  
  47.  
  48. @end
  49.